package cc.rengu.igas.route.common.enums;

import cc.rengu.oltp.service.common.enums.OltpRpcdEnum;

/**
 * 智能路由应答码枚举
 *
 * @author lizhangtao
 * @version 1.0
 * @date 20200708
 */
public enum SmartRouteRspEnums {
    /**
     * 交易成功
     */
    TRANS_SUCCESS(OltpRpcdEnum.TRANS_SUCCESS.getRespCode(), OltpRpcdEnum.TRANS_SUCCESS.getRespDesc()),
    TRANS_ACQ_SUCC("S000A001", "交易受理成功，请查询最终状态"),
    MSG_VALID_CHECK_ERROR("ER11RT01", "报文检查失败"),
    CONFIG_ERROR("ER12RT01", "参数配置错误"),
    NO_AVAILABLE_DST_CHANNEL_ERROR("ER12RT02", "无可用通道"),
    ILL_SRC_CHANNEL_ERROR("ER12RT03", "渠道非法"),
    SAVE_MSG_ERROR("ER12RT04", "信息入库失败"),
    NO_ORIG_TRANS_ERROR("ER12RT05", "无原交易流水"),
    EXCEED_SINGLE_AMT_LIMIT_ERROR("ER12RT06", "超过单笔限额"),
    OUT_OF_OPEN_TIME_ERROR("ER12RT07", "未在营业时间范围"),
    NO_AUTH_ERROR("ER12RT08", "无此业务权限"),
    NOT_SUPPORT_ACCT_TYPE_ERROR("ER12RT09", "不支持此账户类型"),
    VERIFY_NOT_ENOUGH("ER12RT10", "信息校验不够"),
    NOT_FETCH_SYSPARAM("ER12RT11", "未获取到对应参数"),
    NO_VALID_SIGN("ER12RT12", "不存在有效签约，禁止交易"),

    TRANS_FAIL("ER12RT99", "交易失败"),
    TRANS_TO(OltpRpcdEnum.BIZ_PROCESS_TIMEOUT.getRespCode(), "交易超时状态未知"),
    TXN_AMT_ILLEGAL("ER12RT13", "交易金额不合法");;

    private String respCode;
    private String respDesc;


    SmartRouteRspEnums(String respCode, String respDesc) {
        this.respCode = respCode;
        this.respDesc = respDesc;
    }

    public String getRespCode() {
        return respCode;
    }

    public void setRespCode(String respCode) {
        this.respCode = respCode;
    }

    public String getRespDesc() {
        return respDesc;
    }

    public void setRespDesc(String respDesc) {
        this.respDesc = respDesc;
    }
}
